home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic 4 Database How-To
/
Visual Basic 4 Database - How-to (The Waite Group)(1995).iso
/
select2.fr_
/
select2.fr
Wrap
Text File
|
1995-07-04
|
4KB
|
131 lines
VERSION 4.00
Begin VB.Form Form1
BackColor = &H00C0C0C0&
Caption = "DISTINCT SELECTer"
ClientHeight = 3225
ClientLeft = 1080
ClientTop = 2460
ClientWidth = 5340
Height = 3630
Left = 1020
LinkTopic = "Form1"
ScaleHeight = 3225
ScaleWidth = 5340
Top = 2115
Width = 5460
Begin VB.CommandButton cmdClose
Caption = "&Close Form"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
TabIndex = 3
Top = 2040
Width = 1995
End
Begin VB.CommandButton cmdShowUnique
Caption = "Show &Unique"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
TabIndex = 2
Top = 1260
Width = 1995
End
Begin VB.CommandButton cmdShowAll
Caption = "Show &All"
BeginProperty Font
name = "MS Sans Serif"
charset = 0
weight = 700
size = 8.25
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
Height = 495
Left = 2640
TabIndex = 1
Top = 540
Width = 1995
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "C:\VB\BIBLIO.MDB"
Exclusive = 0 'False
Height = 300
Left = 900
Options = 0
ReadOnly = 0 'False
RecordsetType = 2 'Snapshot
RecordSource = ""
Top = 2640
Visible = 0 'False
Width = 1140
End
Begin MSDBCtls.DBList DBList1
Bindings = "SELECT2.frx":0000
DataField = "State"
Height = 2010
Left = 840
TabIndex = 0
Top = 480
Width = 975
_Version = 65536
_ExtentX = 1720
_ExtentY = 3545
_StockProps = 77
BackColor = -2147483643
ListField = "State"
BoundColumn = "State"
MouseIcon = "SELECT2.frx":000E
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClose_Click()
End
End Sub
Private Sub cmdShowAll_Click()
Dim sql As String
sql = "SELECT [State] FROM [Publishers]"
sql = sql & " WHERE [State] IS NOT NULL"
sql = sql & " ORDER BY [State]"
Data1.RecordSource = sql
Data1.Refresh
DBList1.Refresh
End Sub
Private Sub cmdShowUnique_Click()
Dim sql As String
sql = "SELECT DISTINCT [State] FROM [Publishers]"
sql = sql & " WHERE [State] IS NOT NULL"
sql = sql & " ORDER BY [State]"
Data1.RecordSource = sql
Data1.Refresh
DBList1.Refresh
End Sub